[ZP] Как добавить эффекты к гранатам для ZP?

Как добавить эффекты к гранатам для ZP?


Для начала открываем исходник главного мода, у меня это "zombie_plague40."

[1]. После того как мы открыли исходник главного мода, ищем такие строчки как:

// CS sounds
new const sound_flashlight[] = "items/flashlight1.wav"
new const sound_buyammo[] = "items/9mmclip1.wav"
new const sound_armorhit[] = "player/bhit_helmet-1.wav" 


Ниже добавляем следующую строку:

new g_fireexp


Должно получится вот так:

// CS sounds
new const sound_flashlight[] = "items/flashlight1.wav"
new const sound_buyammo[] = "items/9mmclip1.wav"
new const sound_armorhit[] = "player/bhit_helmet-1.wav" 
new g_fireexp

[2]. Далее ищем:

// Custom sprites for grenades
g_exploSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_ring)
g_flameSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_fire)
g_smokeSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_smoke)
g_glassSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_glass)


Ниже добавляем:

g_fireexp = precache_model("sprites/Ваш спрайт.spr")


Должно получится вот так:
// Custom sprites for grenades
g_exploSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_ring)
g_flameSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_fire)
g_smokeSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_smoke)
g_glassSpr = engfunc(EngFunc_PrecacheModel, sprite_grenade_glass)
g_fireexp = precache_model("sprites/Ваш спрайт.spr")


[3]. Далее ищем:

// Fire Grenade: Fire Blast
create_blast2(const Float:originF[3])
{


Ниже добавляем:

// Fire Sprite
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
write_byte (TE_SPRITE) // TE ID
engfunc(EngFunc_WriteCoord, originF[0]) // Position X
engfunc(EngFunc_WriteCoord, originF[1]) // Y
engfunc(EngFunc_WriteCoord, originF[2] + 50.0) // Z
write_short(g_fireexp) // Sprite index
write_byte(30) // Size of sprite
write_byte(180) // Framerate
message_end()


Все, со спрайтом взрыва закончено.


Теперь делаем осколки.

[1]. Находим:

new g_fireexp


Ниже добавляем:

new g_fire_gibs


[2]. Далее находим:

g_fireexp = precache_model("sprites/Ваш спрайт.spr")


Ниже добавляем:

g_fire_gibs = precache_model("sprites/Ваш спрайт.spr")


[3]. Находим:

// Fire Grenade Explosion
fire_explode(ent)
{


После строк:

// Make the explosion
create_blast3(originF)


Добавляем следующие:

message_begin (MSG_BROADCAST,SVC_TEMPENTITY)
write_byte( TE_SPRITETRAIL ) // Throws a shower of sprites or models
engfunc(EngFunc_WriteCoord, originF[ 0 ]) // start pos
engfunc(EngFunc_WriteCoord, originF[ 1 ])
engfunc(EngFunc_WriteCoord, originF[ 2 ] + 200.0)
engfunc(EngFunc_WriteCoord, originF[ 0 ]) // velocity
engfunc(EngFunc_WriteCoord, originF[ 1 ])
engfunc(EngFunc_WriteCoord, originF[ 2 ] + 30.0)
write_short(g_fire_gibs) // spr
write_byte(60) // (count)
write_byte(random_num(27,30)) // (life in 0.1's)
write_byte(2) // byte (scale in 0.1's)
write_byte(50) // (velocity along vector in 10's)
write_byte(10) // (randomness of velocity in 10's)
message_end()

Hello, our administration publishes only cannon content, put like under the post below and write the best comment, we are preparing material just for you, Darling Гость.

Comments 1
Информация
Посетители, находящиеся в группе Guests, не могут оставлять комментарии к данной публикации.
Our Discord partners
Foundation for your build
ReHLDS 3.4.0.654

ReHLDS (Reverse-engineered) - this is a new step forward that gives a second wind to our servers. ReHLDS works 2 times faster than HLDS.

AmxModx 1.8.3

AMXModX is a Metamod add-on that allows you to create new modifications for Half-Life in the Pawn language

Reunion 0.1.92

Reunion is a continuation of Dproto for ReHLDS. This is a metamod plugin that allows you to log into the 47/48 Non-Steam server.

Revoice 0.1.0.32

Revoice is a Metamod plugin that allows voice chat between non-steam and steam clients.

Metamod-r 1.3.0.127

The new Metamod-r contains a huge number of performance optimizations and much cleaner code. The kernel was written using a JIT compiler.

Ultimate Unprecacher 1.1

Ultimate Unprecacher is a plugin for MetaMod, it works on the principle of disabling unnecessary resources on your server, thereby you can free up space for resources for your plugins, using this module you can get rid of error 512!

ReAuthCheck 0.1.6

ReAuthCheck - this is a Metamod plugin that checks your players for validity, with this module for REHLDS you can protect your server from bots that constantly spam ads or simply clog up a slot on the server!

NetBufExtender (NBEX) 1.0

NetBufExtender or NBEX - This is a metamod plugin that expands the пїЅInternet bufferпїЅ: server and client buffers (not 100% guaranteed). Expands up to 64 kb. This means that players are less likely to be kicked with the error "Reliable channel overflowed"".

UserInfoNetOptimizer (UINO) 1.0

UINO пїЅ metamod plugin that allows you to remove unnecessary fields from userinfo(setinfo) when the engine passes it to other players on the server. This measure reduces the amount of data transferred and slightly reduces the chance of being kicked with "Reliable channel overflowed".

Information

Welcome to TB-TEAM.COM!

Welcome To Our New Website For CS1.6 Resources!.
Register
Create your own account!

Register Now!
Login
Already registered? Come on, log in quickly!

Login to the site